PATHMac OS 8 Developer Documentation > Operating System Services > Multiprocessing Services >

Adding Multitasking Capability to Applications Using Multiprocessing Services

   

MPArmTimer

Arms the timer to expire at a given time.

OSStatus MPArmTimer (
                     MPTimerID timerID,
                     AbsoluteTime *expirationTime,
                     OptionBits options);
timerID
A value of type MPTimerID that specifies the ID of the timer you want to arm.
expirationTime
A pointer to a value of type AbsoluteTime that specifies when you want the timer to expire. Note that if you arm the timer with a time that has already passed, the timer expires immediately.
options
A value of type OptionBits specifying any optional action. See Timer Option Masks for a list of possible values.
function result
A result code. See Result Codes for a list of possible values. If the timer has already expired, the reset does not take place and the function returns kMPInsufficientResourcesErr .
DISCUSSION

The expiration time is an absolute time, which you can generate by calling the UpTime function. When the timer expires, a notification is sent to the notification mechanism specified in the last MPSetTimerNotify call. If the specified notification ID has become invalid, no action is taken when the timer expires. The timer itself is deleted when it expires unless you specified the kMPPreserveTimerID option in the options parameter.

VERSION NOTES

Introduced with Multiprocessing Services 2.0.

SEE ALSO

The function MPCancelTimer .

The function MPSetTimerNotify .


© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)